package com.example.excelapache_poi.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * Created by IntelliJ IDEA2022.3.2
 * @Author: Tenghw
 * @Date: 2023/07/06  13:01
 * @Description:
 */
@Data
public class UserDto {
    /**
     * 账号id
     */
    @Min(value = 1, message = "最小值为1")
    @Max(value = Long.MAX_VALUE, message = "最大值Long.MAX_VALUE")
    private Long id;
    /**
     * 用户名
     */
    @Length(min = 2, max = 10, message = "名称长度必须在0到10个字符之间")
    private String userName;
}
